#!/usr/bin/env python
#-*- coding:utf-8 -*- 

import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(-5, 5, 25)
y = (x+1)**2+1


plt.figure()
plt.plot(x, y)
plt.bar(x, y, 0.05)
plt.show()